Skip to content

fix(nix): use wrapped Electron in dev shell - #1027

Open
bet4it wants to merge 1 commit into
getopenscreen:mainfrom
bet4it:fix/nix-electron-dev-shell
Open

bet4it wants to merge 1 commit into
getopenscreen:mainfrom
bet4it:fix/nix-electron-dev-shell

Conversation

@bet4it

@bet4it bet4it commented Oct 6, 2026 •

Copy link
Copy Markdown

Problem

The Nix development shell pointed npm's electron package at ${electron}/libexec/electron. vite-plugin-electron then launched the unwrapped Electron binary, so npm run dev could build successfully but fail to open the GUI on Linux.

Changes

  • Use the Nixpkgs Electron launcher from ${electron}/bin on Linux.
  • Use the macOS application bundle directory on Darwin.
  • Skip npm's Electron binary download in the Nix development shell.

Validation

  • Verified the npm electron module resolves to the Nixpkgs launcher.
  • Ran npm run dev from nix develop; the Electron main process started and registered the global shortcut.
  • git diff --check passed.

Summary by CodeRabbit

  • Chores
    • The development environment now selects the Electron location based on the platform, supporting the different layouts used on macOS and other systems. Automatic Electron binary downloads remain disabled. This update affects development setup only; it does not change the app’s end-user features.

@bet4it
bet4it requested a review from EtienneLescot as a code owner October 6, 2026 00:49
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72030f8c-dcfa-4646-8065-88c1b15f0508
📥 Commits

Reviewing files that changed from the base of the PR and between 8f3046c and 87e05c2.

📒 Files selected for processing (1)
  • flake.nix

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The dev shell keeps Electron binary downloads disabled and sets ELECTRON_OVERRIDE_DIST_PATH to a path selected by host platform.

Changes

Dev shell Electron configuration

Layer / File(s) Summary
Select the Electron distribution path
flake.nix
The dev shell sets the Electron path to ${electron}/Applications on Darwin and ${electron}/bin on other platforms. It keeps ELECTRON_SKIP_BINARY_DOWNLOAD enabled.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 87e05

No actionable merge-blocking issue is established for the supported development shells.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 87e05

The change uses the existing Nix-provided Electron package through its launcher and disables a separate npm binary download. The reviewed changes are confined to the development shell, with no added privileges, secret access, or production deployment changes identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The direct exposure change is limited to Electron installation and launch behavior within this development shell. The inspected change does not expand service, tenant, data-store, or production deployment authority.

Trust Boundaries and Controls

  • observed — The configuration explicitly requests skipping npm’s Electron binary download while retaining the already-selected Nixpkgs Electron dependency. This is a development-shell binary-source policy, not evidence that npm install scripts are generally disabled or that Electron’s sandbox guarantees have changed.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: using the wrapped Electron launcher in the Nix development shell.
Description check ✅ Passed The description explains the problem, changes, and validation. It does not include the template’s related issue, type of change, release impact, or desktop impact sections, but the core information is…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant